//
//  HYLTuanGouCell.m
//  TuanGou使用Xib
//
//  Created by hyl on 16/5/30.
//  Copyright © 2016年 hyl. All rights reserved.
//

#import "HYLTuanGouCell.h"

@interface HYLTuanGouCell ()
@property (weak, nonatomic) IBOutlet UIImageView *icon;
@property (weak, nonatomic) IBOutlet UILabel *titleLable;
@property (weak, nonatomic) IBOutlet UILabel *priceLable;
@property (weak, nonatomic) IBOutlet UILabel *buyCoutLable;


@end

@implementation HYLTuanGouCell

-(instancetype) initWithTableView:(UITableView *)tableView{
    if (self=[super init]) {
        HYLTuanGouCell *cell=[tableView dequeueReusableCellWithIdentifier:@"tuangou"];
        cell=[[[NSBundle mainBundle]loadNibNamed:NSStringFromClass([HYLTuanGouCell class]) owner:nil options:nil]firstObject];
        
        self=cell;
    }
    return self;
}
#pragma mark - setter/getter
-(void) setTuanGou:(HYLTuanGou *)tuanGou{
    self.icon.image=[UIImage imageNamed:tuanGou.icon];
    self.titleLable.text=tuanGou.title;
    self.priceLable.text=tuanGou.price;
    self.buyCoutLable.text=tuanGou.buyCount;
}
@end
